local skill = fk.CreateSkill {
  name = "#lvshi__guding_blade_skill",
  tags = { Skill.Compulsory },
  attached_equip = "guding_blade",
}

skill:addEffect(fk.DamageCaused, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skill.name) and data.card and data.card.trueName == "slash"
    and data.by_user and (data.to:isKongcheng() or table.every(player.room:getOtherPlayers(data.to), function (p)
      return p.hp > data.to.hp
    end))
  end,
  on_use = function(self, event, target, player, data)
    player.room:broadcastPlaySound("./packages/maneuvering/audio/card/guding_blade")
    player.room:setEmotion(player, "./packages/maneuvering/image/anim/guding_blade")
    data:changeDamage(1)
  end,
})

return skill
